home *** CD-ROM | disk | FTP | other *** search
- Date: Sun, 31 Jul 94 21:53:32 +0200
- From: thuerman@ibr.cs.tu-bs.de (Urs Thuermann)
- Message-Id: <9407311953.AA10880@diana>
- To: entropy@terminator.rs.itd.umich.edu
- In-Reply-To: "Nicholas S Castellano"'s message of Fri, 29 Jul 1994 04:58:57 -0400 <199407290858.EAA15969@terminator.rs.itd.umich.edu>
- Subject: Pvfork()
-
- Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>:
-
- > I have just recetly learned that vfork() is supposed to block even
- > under "real" Unix (if it's available at all). So there is no real
- > need for a non-blocking Pvfork() since no Unix code depends on it :-)
-
- Nicholas S Castellano <entropy@terminator.rs.itd.umich.edu>:
-
- > Indeed you are correct! I didn't know that either, but APUE does say
- > that it blocks. Sigh...I was hoping to avoid the need for kludges
- > like __fork_and_exit(), by simply using vfork() instead of fork().
-
- Yes, U*ix always has fork() but not neccessarily vfork(). vfork() is
- a bit of a kludge on systems that don't have efficient copy-on-write
- for pages in the process memory. On PC Linux vfork() is a just
- synonym for fork().
-
- >From the SunOs man page:
-
- vfork() can be used to create new processes without fully
- copying the address space of the old process, which is
- horrendously inefficient in a paged environment. It is use-
- ful when the purpose of fork(2V), would have been to create
- a new system context for an execve(2V). vfork() differs
- from fork() in that the child borrows the parent's memory
- and thread of control until a call to execve(2V), or an exit
- (either by a call to exit(2V) or abnormally.) The parent
- process is suspended while the child is using its resources.
-
- [...]
-
- This system call will be eliminated in a future release.
- System implementation changes are making the efficiency gain
- of vfork() over fork(2V) smaller. The memory sharing seman-
- tics of vfork() can be obtained through other mechanisms.
-
-
- Urs
-